import React from "react";
import {Icon,} from 'antd';
import "../../../static/css/mobile/imgInfo.less";


export default class pc extends React.Component{
	constructor(){
		super();
		this.state={
			username:"默认值"
		}
	}
	componentDidMount(){
		var usernameinfo=localStorage.getItem("username");
		console.log(usernameinfo)
		if(usernameinfo){
			this.setState({
			    username:usernameinfo
		    })
			console.log(this.state.username)
		}else{
			this.setState({
			    username:"默认值"
		   })
		}
		
	}
	render(){
		return (
			<div className="continaer">
			   <div className="imgBox">
			        <Icon type="user-add" />
			   </div>
			   <div className="contentBox">
			        <p>
			            <span>用户名:</span> 
			            <span>{this.state.username}</span> 
			        </p>
			        <p>
			            <span>昵称:</span>
			            <span>未知</span>
			        </p>
			   </div>
			</div>
		)
	}
}